﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ArkhamHorrorHelper
{
    public partial class InvstigatorDetail : Form
    {
        private String investigatorName;
        private Dictionary<String, int[]> investigatorValues;

        public InvstigatorDetail(String investigatorName)
        {
            InitializeComponent();
            this.investigatorName = investigatorName;
            this.Text = investigatorName;

            investigatorValues = new Dictionary<string, int[]>();
            investigatorValues.Add("Jenny Barnes", new int[] { 1, 2, 4, 6, 2 });
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            if (!this.investigatorValues.Keys.Contains(investigatorName))
            {
                MessageBox.Show("Investigator name " + investigatorName + " not a valid name!");
                this.Close();
                return;
            }

            this.Text = investigatorName;
            int[] values = investigatorValues[investigatorName];

            this.sanityValue.Value = values[0];
            this.staminaValue.Value = values[1];
            this.cluesValue.Value = values[2];
            this.moneyValue.Value = values[3];

            this.focusValue.Text = values[4].ToString();

            this.macTrackBar1.Maximum = 3;
            this.macTrackBar1.Minimum = 0;

            this.macTrackBar2.Minimum = 1;
            this.macTrackBar2.Maximum = 4;
   
        }

    }
}
